<%-- 
    Document   : leftCanhan
    Created on : Dec 21, 2013, 12:13:37 AM
    Author     : Welcome
--%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="businesscard.DAO.UserDAO"%>
<%@page import="bc.entity.User"%>
<%@page import="bc.entity.Thanhtoan"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<head>
     <script type="text/javascript" src="jquery/jquery-1.1.3.1.min.js"></script> 
        <script type="text/javascript" src="jquery/jquery-1.4.2.js"></script> 
        <script type="text/javascript" src="jquery/jquery-latest.js"></script>
        <script type="text/javascript" src="jquery/myjquery.js"></script>
</head>
<!DOCTYPE html>
 <div class="leftsitecanhan">
                        <%  
                            User user = (User) request.getSession().getAttribute("USER");
                            String username = user.getUser();
                            UserDAO userDAO = new UserDAO();
                            User user1 = userDAO.getUser2(username);
                            String hinh = user1.getHinhanh();
                            int point = user1.getPoint();
                            String link = "avatar/" + hinh;
                            String dienthoai = user1.getSdt();
                            String email = user1.getEmail();
                            Date ngaysinh = user1.getNgaysinh();
                            SimpleDateFormat ft = new SimpleDateFormat("dd-MM-yyyy");
                            String birthday = ft.format(ngaysinh);
                            int gioitinh = user1.getGioitinh();
                            String sex = "";
                            if (gioitinh == 1) {
                                sex = "nam";
                            } else {
                                sex = "nữ";
                            }
                            String soCMND = user1.getCmnd();
                            UserDAO urdao = new UserDAO();
                            String dc = urdao.getDC(username);
                        %>
                        <div id="hinhdaidien"><image src="<%=link%>" style="width: 230px ; height: 200px; "/>
                            <div class="avatar"><a href="#">Edit</a></div>
                        </div>
                            <div class="editAva">
                                <div id="M_close"></div>
                                <form action="UserController" method="post"> 
                                    <input type="file" name="txtAvatar" class="txtAvatar"/>
                                    <input type="submit" name="action" value="Edit Avatar"/>
                                </form>
                            </div>
                        <div class="ten"><h2 style="color: red;"><%=username%></h2></div>
                        <div class="diem"> <h3>Điểm: <a href="#"><%=point%></a></h3></div>
                        <div class="thongtincanhan">
                            <h3 style="margin-top: 4px;padding-top: 10px;">THÔNG TIN </h3><h4 style="margin-top: -18px;margin-left:180px;"><a href="EditCanhan.jsp">Edit</a></h4>
                            <h4 style="padding-top: 15px;margin-left:-152px;">Địa chỉ: </h4><h5 style="margin-left:60px;margin-top:-18px;"><%=dc%></h5>
                            <h4 style=" margin-left:-130px;">Điện thoại: </h4><h5 style="margin-left:30px;margin-top:-18px;"><%=dienthoai%></h5>
                            <h4 style=" margin-left:-165px;">Email: </h4><h5 style="margin-left:30px;margin-top:-18px;"><%=email%> </h5>
                            <h4 style=" margin-left:-135px;">Ngày sinh: </h4><h5 style="margin-left:30px;margin-top:-18px;"><%=birthday%></h5>
                            <h4 style=" margin-left:-145px;">Giới tính:</h4><h5 style="margin-left:20px;margin-top:-18px;"><%=sex%></h5>
                            <h4 style=" margin-left:-142px;">Số CMND:</h4><h5 style="margin-left:20px;margin-top:-18px;"><%=soCMND%></h5>
                        </div>
                        <div class="chucnang">
                            <h3 style="margin-top: 4px;padding-top: 4px;">CHỨC NĂNG </h3>
                            <p id="changepass" style="padding-top: 8px;">
                                <a href="changepass.jsp">Thay đổi mật khẩu?</a>
                            </p>
                            <p>
                                <a href="addAccount.jsp">Thêm một liên hệ</a>
                            </p> 
                            <p><a href="#">Danh sách Liên hệ của bạn</a></p>
                            <p><a href="#">Danh sách hóa đơn</a></p>
                        </div> 
                    </div>
